home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / Developer University / DUProjects / Finance SOM Library / •SOM / SFinance.xih < prev   
Encoding:
Text File  |  1996-04-01  |  7.8 KB  |  299 lines  |  [TEXT/CWIE]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: :SFinance.xih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxih.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_DevUniv_SFinance_xih
  11. #define SOM_DevUniv_SFinance_xih
  12.  
  13. #include <somcls.xh>
  14. #include <somcm.xh>
  15.  
  16. #ifndef SOM_DevUniv_SFinance_xh
  17. #include <SFinance.xh>
  18. #endif
  19.  
  20. /*
  21.  * Set the scope of methods functions
  22.  */
  23. #ifndef SOM_Scope
  24. #define SOM_Scope extern "C"
  25. #endif
  26.  
  27. #define DevUniv_SFinance_MaxNoMethods 9
  28.  
  29. /*
  30.  * -- Instance Data
  31.  */
  32. typedef void DevUniv_SFinanceData;
  33.  
  34. /*
  35.  * Trace/Debug macro
  36.  */
  37. #ifndef DevUniv_SFinanceMethodDebug
  38. #define DevUniv_SFinanceMethodDebug(c,m) SOMMethodDebug(c,m)
  39. #endif
  40.  
  41. /*
  42.  * -- Method Macros for use in Method Procedures
  43.  */
  44. #ifdef METHOD_MACROS
  45.   #define _somInit somSelf->somInit
  46.   #define _somUninit somSelf->somUninit
  47.   #define _somDuplicateReference somSelf->somDuplicateReference
  48.   #define _somCompareReference somSelf->somCompareReference
  49.   #define _somRelease somSelf->somRelease
  50.   #define _somFree somSelf->somFree
  51.   #define _somCanDelete somSelf->somCanDelete
  52.   #define _somGetClass somSelf->somGetClass
  53.   #define _somGetClassName somSelf->somGetClassName
  54.   #define _somGetSize somSelf->somGetSize
  55.   #define _somIsA somSelf->somIsA
  56.   #define _somRespondsTo somSelf->somRespondsTo
  57.   #define _somIsInstanceOf somSelf->somIsInstanceOf
  58.   #define _somDispatch somSelf->somDispatch
  59.   #define _somClassDispatch somSelf->somClassDispatch
  60.   #define _somCastObj somSelf->somCastObj
  61.   #define _somResetObj somSelf->somResetObj
  62.   #define _somPrintSelf somSelf->somPrintSelf
  63.   #define _somDumpSelf somSelf->somDumpSelf
  64.   #define _somDumpSelfInt somSelf->somDumpSelfInt
  65.   #define _FutureValue somSelf->FutureValue
  66.   #define _FutureValueWithPayments somSelf->FutureValueWithPayments
  67.   #define _AnnuityPresentValue somSelf->AnnuityPresentValue
  68.   #define _AnnuityMonths somSelf->AnnuityMonths
  69.   #define _Payment somSelf->Payment
  70.   #define _LoanAmount somSelf->LoanAmount
  71.   #define _LoanMonths somSelf->LoanMonths
  72.   #define _InterestRate somSelf->InterestRate
  73.   #define _BalloonPayment somSelf->BalloonPayment
  74. #endif
  75.  
  76.  
  77. /*
  78.  * Introduced methods
  79.  */
  80.  
  81. /* New Method: FutureValue */
  82. SOM_Scope double  SOMLINK FINANFutureValue(DevUniv_SFinance *somSelf, Environment *ev,
  83.         double presentValue,
  84.         double annualInterestPercent,
  85.         short compoundsPerYear,
  86.         double years);
  87.  
  88. /* New Method: FutureValueWithPayments */
  89. SOM_Scope double  SOMLINK FINANFutureValueWithPayments(DevUniv_SFinance *somSelf, Environment *ev,
  90.         double payment,
  91.         short paymentsPerYear,
  92.         short compoundsPerYear,
  93.         double annualInterestPercent,
  94.         double years);
  95.  
  96. /* New Method: AnnuityPresentValue */
  97. SOM_Scope double  SOMLINK FINANAnnuityPresentValue(DevUniv_SFinance *somSelf, Environment *ev,
  98.         double payment,
  99.         double annualInterestPercent,
  100.         short paymentsPerYear,
  101.         double years);
  102.  
  103. /* New Method: AnnuityMonths */
  104. SOM_Scope double  SOMLINK FINANAnnuityMonths(DevUniv_SFinance *somSelf, Environment *ev,
  105.         double annuity,
  106.         double monthlyWithdrawal,
  107.         double annualInterestPercent);
  108.  
  109. /* New Method: Payment */
  110. SOM_Scope double  SOMLINK FINANPayment(DevUniv_SFinance *somSelf, Environment *ev,
  111.         double amountBorrowed,
  112.         double annualInterestPercent,
  113.         double years);
  114.  
  115. /* New Method: LoanAmount */
  116. SOM_Scope double  SOMLINK FINANLoanAmount(DevUniv_SFinance *somSelf, Environment *ev,
  117.         double monthlyPayment,
  118.         double annualInterestPercent,
  119.         double years);
  120.  
  121. /* New Method: LoanMonths */
  122. SOM_Scope double  SOMLINK FINANLoanMonths(DevUniv_SFinance *somSelf, Environment *ev,
  123.         double amountBorrowed,
  124.         double monthlyPayment,
  125.         double annualInterestPercent);
  126.  
  127. /* New Method: InterestRate */
  128. SOM_Scope double  SOMLINK FINANInterestRate(DevUniv_SFinance *somSelf, Environment *ev,
  129.         double amountBorrowed,
  130.         double monthlyPayment,
  131.         double years);
  132.  
  133. /* New Method: BalloonPayment */
  134. SOM_Scope double  SOMLINK FINANBalloonPayment(DevUniv_SFinance *somSelf, Environment *ev,
  135.         double amountBorrowed,
  136.         double monthlyPayment,
  137.         double annualInterestPercent,
  138.         double years);
  139.  
  140. /*
  141.  * -- Primary Implementation File Support
  142.  */
  143. #if (defined(DevUniv_SFinance_Class_Source) || defined(SOM_Module_sfinance_Source))
  144.  
  145. /*
  146.  * -- The DevUniv_SFinance ClassData Structure
  147.  */
  148.  
  149. #if PRAGMA_IMPORT_SUPPORTED
  150. #pragma export list DevUniv_SFinanceClassData
  151. #endif
  152.  
  153.  
  154. /*
  155.  * -- The DevUniv_SFinance Class Ancestor Table
  156.  */
  157. static somClassDataStructure * SOMDLINK DevUniv_SFinanceClassAncestors [] = {
  158.     (somClassDataStructure*) & SOMObjectClassData,    /* parent */
  159. };
  160.  
  161.  
  162. static void DevUniv_SFinanceDLLD ( void ) { }
  163.  
  164.  
  165. /*
  166.  * -- The DevUniv_SFinance Static Class Info Master Table
  167.  */
  168. static somStaticClassInfo DevUniv_SFinanceSCI = {
  169.       70,    /* layout version */
  170.     (somClassDataStructure*)  & DevUniv_SFinanceClassData,    /* main token table */
  171.       0,    /* no override procs table */
  172.       DevUniv_SFinanceClassAncestors,    /* ancestor table */
  173.       DevUniv_SFinanceDLLD,    /* DLLdesignator */
  174.       0,    /* no special procs */
  175.       0,    /* rtci slot */
  176.       0,    /* count slot */
  177.       0,    /* dynamic ancestry */
  178.       0,    /* free */
  179.       0,    /* free */
  180.       0,    /* free */
  181.       0,    /* free */
  182.  
  183. /*
  184.  * -- The DevUniv_SFinance Counts Table
  185.  */
  186.     (somStaticClassCounts *)
  187.         "\x00\x00\x00\x01"    /* majorversion */
  188.         "\x00\x00\x00\x00"    /* minorversion */
  189.         "\x00\x00\x00\x01"    /* flags */
  190.             "\x00\x00"    /* type code alignment */
  191.             "\x00\x09"    /* classTokenCount */
  192.             "\x00\x01"    /* numDirectParents */
  193.             "\x00\x00"    /* numMetaClasses */
  194.             "\x00\x00"    /* numOverriddenAncestors */
  195.             "\x00\x00"    /* numMigratedMethods */
  196.             "\x00\x00"    /* numSelectedInherited */
  197.             "\x00\x00"    /* numUnused */
  198.             "\x00\x00"    /* free */
  199.             "\x00\x00"    /* free */
  200.             "\x00\x00"    /* free */
  201.             "\x00"    /* free */
  202.                 ,
  203.  
  204.     {
  205.       "DevUniv::SFinance",    /* the class name */
  206.       0, /* no class instance data */
  207.  
  208. /*
  209.  * -- The DevUniv_SFinance Parent Versions Table
  210.  */
  211.     (somParentVersions *)
  212.         "\x00\x00\x00\x46"    /* majorversion */
  213.         "\x00\x00\x00\x01"    /* minorversion */
  214.                 ,
  215.  
  216.  
  217. /*
  218.  * -- The DevUniv_SFinance Token Slot Usage Table
  219.  */
  220.     (somSlotUsage *)
  221.         "\x00\x00\x00\x00",
  222.  
  223.  
  224. /*
  225.  * -- The DevUniv_SFinance Method Signature Info
  226.  */
  227.     (somSignatureInfo *)
  228.         "\x06\xd9\xc9\x93\x90"    /* FutureValue */
  229.          "\x07\xd9\xc9\x33\x99"    /* FutureValueWithPayments */
  230.          "\x06\xd9\xc9\x93\x90"    /* AnnuityPresentValue */
  231.          "\x05\xc9\xc9\x99"    /* AnnuityMonths */
  232.          "\x05\xc9\xc9\x99"    /* Payment */
  233.          "\x05\xc9\xc9\x99"    /* LoanAmount */
  234.          "\x05\xc9\xc9\x99"    /* LoanMonths */
  235.          "\x05\xc9\xc9\x99"    /* InterestRate */
  236.          "\x06\xc9\xc9\x99\x90"    /* BalloonPayment */
  237.              ,
  238.  
  239.  
  240. /*
  241.  * -- The DevUniv_SFinance Class Method Names
  242.  */
  243.         "FutureValue\0"
  244.         "FutureValueWithPayments\0"
  245.         "AnnuityPresentValue\0"
  246.         "AnnuityMonths\0"
  247.         "Payment\0"
  248.         "LoanAmount\0"
  249.         "LoanMonths\0"
  250.         "InterestRate\0"
  251.         "BalloonPayment\0"
  252.             ,
  253.  
  254.       0,    /* no override data table */
  255.       0,    /* no migrated methods table */
  256.       0,    /* no selected inherited */
  257.       0,    /* unused */
  258.  
  259.       0,    /* free */
  260.       0,    /* free */
  261.       0,    /* free */
  262.       0,    /* free */
  263.     },
  264. };
  265.  
  266. /*
  267.  * -- The DevUniv_SFinance ClassData Structure
  268.  */
  269. struct DevUniv_SFinanceClassDataStructure SOMDLINK DevUniv_SFinanceClassData = {
  270.       0,            /* zero */
  271.     & DevUniv_SFinanceSCI,        /* SCI link */
  272.       0,            /* instanceDataToken */
  273.       0,            /* reserved */
  274.       0,            /* reserved */
  275.       0,            /* reserved */
  276.     (somMToken) FINANFutureValue,    /* FutureValue:method */
  277.     (somMToken) FINANFutureValueWithPayments,    /* FutureValueWithPayments:method */
  278.     (somMToken) FINANAnnuityPresentValue,    /* AnnuityPresentValue:method */
  279.     (somMToken) FINANAnnuityMonths,    /* AnnuityMonths:method */
  280.     (somMToken) FINANPayment,    /* Payment:method */
  281.     (somMToken) FINANLoanAmount,    /* LoanAmount:method */
  282.     (somMToken) FINANLoanMonths,    /* LoanMonths:method */
  283.     (somMToken) FINANInterestRate,    /* InterestRate:method */
  284.     (somMToken) FINANBalloonPayment,    /* BalloonPayment:method */
  285. };
  286.  
  287.  
  288. /*
  289.  * Functions for attributes.
  290.  */
  291.  
  292. /*
  293.  * Macros for initializers/destructors
  294.  */
  295.  
  296. #endif /* Primary Implementation Support */
  297.  
  298. #endif       /* SOM_DevUniv_SFinance_xih */
  299.